package git.matrix.service.impl;

import java.util.ArrayList;
import java.util.List;

import git.matrix.mapper.BillMapper;
import git.matrix.pojo.Bill;
import git.matrix.service.BillServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


/**
 * 服务   
 */
@Service   //使用注解----spring创建bean
@Transactional//  自动扫描   ---正常--提交；   异常---回滚事物
public class BillServicesImpl implements BillServices {

	// 由spring注入mapper
	@Autowired
    BillMapper billMapper;
	
	public List<Bill> getAllBill() {
		// TODO Auto-generated method stub
		return billMapper.getAllBill();
	}

	public List<Bill> getBillByProId(int proID) {
		// TODO Auto-generated method stub
		return new ArrayList();
	}

	public List<Bill> getBillByProNameProID(String productName,
			String providerId, String isPayment) {
		// TODO Auto-generated method stub
		return billMapper.getBillByProNameProID(productName, providerId, isPayment);
	}

	public Bill getBillByID(int billid) {
		// TODO Auto-generated method stub
		return billMapper.getBillByID(billid);
	}

}
